/**
 * copyright (c) 2017-2023 厦门风领科技有限公司
 * https://www.fengling.cn/
 * 
 * OPPO快游戏适配
 * zengbinsi
 * 2020-08-15 14:03:53
 * 2023-10-23 15:33:25
 */
window.gg = window.gg || {};

if (gg.isQuickGameOPPO) {
    console.log('[TS-API] ===>>>', '适配OPPO小游戏平台');

    gg.channel = gg.EChannelType.QG_OPPO;
    // 跳转小游戏     
    gg.navigateToMiniProgram = gg.navigateToMiniGame;

    gg.getLaunchOptionsSync = qg.getNavigateOptionsSync;

    gg.showToast = (data) => {
        qg.showToast({
            title: data.title || '',
            icon: data.icon || '',
            image: data.image || '',
            duration: (data.duration * 1000) || 1500,
            mask: data.mask || false,
            success: data.success || null,
            fail: data.fail || null,
            complete: data.complete || null,
        });
    };
}